Skip to content
This repository has been archived by the owner on Aug 23, 2019. It is now read-only.

Feat/expose connection handling flow in dial #216

Closed
wants to merge 1 commit into from

Conversation

dryajov
Copy link
Member

@dryajov dryajov commented Apr 2, 2017

@diasdavid @dignifiedquire

I need the ability to pass a raw connection to the swarm and have it encrypted and muxed, this is required for onion dialing, since when I get a conn from one relay to another relay, I have no way to upgrade that with encryption and muxing (handshake).

Here is a typical flow:

  • having a chained multiaddr like this /ipfs/QmRealy1/p2p-circuit/ipfs/QmRelay2/p2p-circuit/ipfs/QmDest
    • I need to dial into /ipfs/QmRealy1/ and hand it the /ipfs/QmRelay2 address as a dest
      • at this point, a relay1 <=> relay2 circuit exists, but since it hasn't been returned to the swarm it has not gone through muxing and encryption. Next time I read from that connection, I get a multristream header sent from QmRelay2 that is the start of the regular p2p handshake, for the relay1 <=> relay2 connection.

Exposing the the dial/handshake flow would allow me to manually send the relay1 <=> relay2 to the swarm and have it go through the handshake. The other option would be to reimplement the handshake in circuit, but I don't think we want to do that :)

@dryajov dryajov changed the title Feat/expose dial flow Feat/expose connection handling flow in dial Apr 2, 2017
@dryajov dryajov requested a review from daviddias April 2, 2017 21:00
@dryajov dryajov self-assigned this Apr 2, 2017
@dryajov dryajov mentioned this pull request Apr 6, 2017
@dryajov dryajov force-pushed the feat/expose-dial-flow branch from bb485e1 to 0317ed6 Compare April 7, 2017 21:04
@dryajov dryajov force-pushed the feat/expose-dial-flow branch from 0317ed6 to 514d480 Compare April 7, 2017 22:20
@daviddias daviddias mentioned this pull request Apr 7, 2017
53 tasks
@daviddias
Copy link
Member

Is this still being used? @dryajov If yes, could you coalesce this PR with #204 for me to review?

Thank you!

@dryajov
Copy link
Member Author

dryajov commented May 10, 2017

This is already part of #181 and can be safely closed.

@dryajov dryajov closed this May 10, 2017
@daviddias daviddias deleted the feat/expose-dial-flow branch May 11, 2017 17:43
@dryajov dryajov mentioned this pull request Aug 16, 2017
48 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants